<template>
  <div class="demo">
    <input v-focus />
    <br />
    <p style="color: #369">ceshi_data---{{ $store.state.ceshi_data }}</p>
    <p style="color: red">
      {{ $store.getters.getceshi_data }}
    </p>
    <p>
      {{ $store.getters.getNav }}
    </p>
    <div v-if="$store.state.userdata">
      用户姓名=== {{ $store.state.userdata.username }}
    </div>
    <button @click="changeStoreData">change_ceshi_data</button>
  </div>
</template>

<script>
import { focus } from "../../../directives/index";
// console.log(draggable)
export default {

  data() {
    return {};
  },
  directives: {
    focus,
  },

  methods: {
    changeStoreData() {
      this.$store.commit(
        "setceshi_data",
        "我是修改后的--ceshi_data" + Date.now()
      );
    },
  },
  components: {},
};
</script>

<style lang='less' scoped>
.demo {
  height: 100vh;
  width: 100vw;
  position: relative;
  .demo1 {
    position: absolute;
    height: 200px;
    width: 200px;
    background-color: red;
  }
}
</style>
